package com.artpri.model;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * AdNews entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ad_news", catalog = "jpw")
public class AdNews implements java.io.Serializable {

	// Fields

	private Integer anId;
	private String anPageName;
	private String anPositionName;
	private String anName;
	private String anPicture;
	private String anUrl;
	private Date anStart;
	private Date anStop;
	private Integer anState;

	// Constructors

	/** default constructor */
	public AdNews() {
	}

	/** minimal constructor */
	public AdNews(String anName, Integer anState) {
		this.anName = anName;
		this.anState = anState;
	}

	/** full constructor */
	public AdNews(String anPageName, String anPositionName, String anName,
			String anPicture, String anUrl, Date anStart, Date anStop,
			Integer anState) {
		this.anPageName = anPageName;
		this.anPositionName = anPositionName;
		this.anName = anName;
		this.anPicture = anPicture;
		this.anUrl = anUrl;
		this.anStart = anStart;
		this.anStop = anStop;
		this.anState = anState;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "an_id", unique = true, nullable = false)
	public Integer getAnId() {
		return this.anId;
	}

	public void setAnId(Integer anId) {
		this.anId = anId;
	}

	@Column(name = "an_page_name", length = 10)
	public String getAnPageName() {
		return this.anPageName;
	}

	public void setAnPageName(String anPageName) {
		this.anPageName = anPageName;
	}

	@Column(name = "an_position_name", length = 10)
	public String getAnPositionName() {
		return this.anPositionName;
	}

	public void setAnPositionName(String anPositionName) {
		this.anPositionName = anPositionName;
	}

	@Column(name = "an_name", nullable = false, length = 50)
	public String getAnName() {
		return this.anName;
	}

	public void setAnName(String anName) {
		this.anName = anName;
	}

	@Column(name = "an_picture")
	public String getAnPicture() {
		return this.anPicture;
	}

	public void setAnPicture(String anPicture) {
		this.anPicture = anPicture;
	}

	@Column(name = "an_url")
	public String getAnUrl() {
		return this.anUrl;
	}

	public void setAnUrl(String anUrl) {
		this.anUrl = anUrl;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "an_start", length = 10)
	public Date getAnStart() {
		return this.anStart;
	}

	public void setAnStart(Date anStart) {
		this.anStart = anStart;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "an_stop", length = 10)
	public Date getAnStop() {
		return this.anStop;
	}

	public void setAnStop(Date anStop) {
		this.anStop = anStop;
	}

	@Column(name = "an_state", nullable = false)
	public Integer getAnState() {
		return this.anState;
	}

	public void setAnState(Integer anState) {
		this.anState = anState;
	}

}